package com.example.mapper;

import com.example.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;



@Mapper
@Repository
public interface DepartmentMapper {

    /**
     * 获取所有信息
     * @return
     */
    List<Department> getAll();

    /**
     * 通过id获取
     * @param param
     * @return
     */
    Department getDepartmentById(Map<String,Object> param);

    /**
     * 根据id删除department
     * @param param: id
     * @return
     */
    Integer delDepartmentById(Map<String,Object> param);

    /**
     * 增加department
     * @return
     */
    Integer addDepartment(Map<String,Object> department);

    /**
     * 根据id更新department
     * @param department
     * @return
     */
    Integer updateDepartmentById(Map<String,Object> department);
}
